package com.yyz.lease.common.utils;

import java.util.Random;

/**
 * 生成验证码
 */
public class CodeUtil {
    public static String getCode(int len) {
        Random r = new Random();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++) {
            int num = r.nextInt(10);
            sb.append(num);
        }
        return sb.toString();
    }
}
